//
//  UserData.h
//  StoneMason
//
//  Created by iOS1 on 16/12/5.
//  Copyright © 2016年 iOS1. All rights reserved.
//

#import "BaseModel.h"
@class UserInfoModel;

@interface UserData : NSObject {
    UserInfoModel *userInfo;
}

@property (nonatomic, assign) BOOL loginState;
@property (nonatomic, copy) NSString *password;
@property (nonatomic, copy) NSString *legalItemsH5Url;
@property (nonatomic,assign) BOOL isAlertViewShowed;

@property (nonatomic, copy) void (^loginStateChanged)(void);

@property (nonatomic, copy) void (^refreshSuccess)(void);

+(instancetype)instance;

-(UserInfoModel *)getUserInfo;
-(NSString *)getPassword;
-(NSString *)getLegalItemsH5Url;

-(void)updateUserInfo:(UserInfoModel *)user;

-(void)refreshFromNet;

BOOL isLogin(void);

-(void)save;

-(void)clearLoginData;
@end

@interface UserInfoModel : NSObject

@property (nonatomic, copy) NSString *sendtime;//发送验证码时间戳, 30分钟内有效

@property (nonatomic, copy) NSString *uid;

@property (nonatomic, copy) NSString *id; //用户ID
@property (nonatomic, copy) NSString *source; //注册来源1 app,2 h5页面
@property (nonatomic, copy) NSString *nickname;    //用户昵称
@property (nonatomic, copy) NSString *birthdaytime; //出生日期<时间戳>
@property (nonatomic, copy) NSString *phone;    //手机号
@property (nonatomic, copy) NSString *password; //密码
@property (nonatomic, copy) NSString *signature;    //个性签名
@property (nonatomic, copy) NSString *career_id;    //行业id
@property (nonatomic, copy) NSString *career_text;    //行业名称
@property (nonatomic, copy) NSString *sex; //性别,1男 ,2女 ,3未知
@property (nonatomic, copy) NSString *headsmall; //用户头像，相对路径，需要拼接域名
@property (nonatomic, copy) NSString *reg_time; //注册时间
@property (nonatomic, copy) NSString *last_time; //最后登录时间
@property (nonatomic, copy) NSString *reg_ip;    //注册IP
@property (nonatomic, copy) NSString *last_ip; //最后登录IP
@property (nonatomic, copy) NSString *user_agent;
@property (nonatomic, copy) NSString *logins;    //登录次数
@property (nonatomic, copy) NSString *balance;    //    用户余额
@property (nonatomic, copy) NSString *integral;    //    用户积分
@property (nonatomic, copy) NSString *level;    //    用户等级积分
@property (nonatomic, copy) NSString *level_text;    //    用户等级，1，2，3，4，5，6
@property (nonatomic, copy) NSString *freeze;    //    冻结资金
@property (nonatomic, copy) NSString *agent_points; //积分
@property (nonatomic, copy) NSString *t_id;    //    推荐人ID
@property (nonatomic, copy) NSString *t_add;
@property (nonatomic, copy) NSString *qrcode;    //    推广二维码url
@property (nonatomic, copy) NSString *status;    //    用户状态：0 禁用，1 正常
@property (nonatomic, copy) NSString *token;    //    采用jwt，需要ap端存储备用
@property (nonatomic, copy) NSString *realname_status;    //    实名认证状态，0 待审核，1正常，2未通过
@property (nonatomic, copy) NSString *realname;    //    真实姓名
@property (nonatomic, copy) NSString *idnumber;    //    身份证号
@property (nonatomic, copy) NSString *fx_status;    //    飞行员认证状态：0待审核，1整除，2未通过
@property (nonatomic, copy) NSString *fx_name;    //    飞行员姓名
@property (nonatomic, copy) NSString *fx_type;    //    飞行驾驶证类型
@property (nonatomic, copy) NSString *fx_number;    //    飞行驾驶证编号
@property (nonatomic, copy) NSString *fx_lz_time;    //    飞行驾驶证领证时间
@property (nonatomic, copy) NSString *fx_pic_z;    //    驾驶证正面图
@property (nonatomic, copy) NSString *fx_pic_f;    //    驾驶证反面图

@property (nonatomic, copy) NSString *kf_phone; //客服电话

//积分商城
@property (nonatomic, copy) NSString *rank;    //等级
@property (nonatomic, copy) NSString *rank_text; //等级文字
@property (nonatomic, copy) NSString *deadline;    //截止日期

@property (nonatomic, copy) NSString *high;
@property (nonatomic, copy) NSString *low;

@property (nonatomic, copy) NSString *jf_percent;
@end
